package inabit.compiler.parser;

import inabit.compiler.parser.grammar.NonTerminal;
import inabit.compiler.parser.grammar.Symbol;

/**Represents a semantic action which is a symbol of a production
 * that executes an action when derived*/
/**@author Rafael Rocha*/
public abstract class SemanticAction implements Symbol{

	private NonTerminal nonTerminal;
	
	public SemanticAction(NonTerminal nonTerminal) {
		this.nonTerminal = nonTerminal;
	}
	
	
	/**Returns the nonTerminal passed by parameter in the semantic action
	 * constructor*/
	public NonTerminal variable() {
		return nonTerminal;
	}

	public abstract void execute() throws Exception;
}
